#include "FreeRTOS.h"

#include "util.h"

void UTIL_IntToStr( u8* str, u8* len, u16 num )
    {
    u8 l = 0;
    u8 i;
    u16 t, p = 10000;
    
    for ( i = 0; i < 5; i++ )
        {
        t = num / p;
        
        if (l == 0)
            {
            if (t > 0)
                {
                str[l] = '0' + t;
                l++;
                }
            }
        else
            {
            str[l] = '0' + t;
            l++;
            }
        
        num %= p;
        p /= 10;
        }
    
    *len = l;
    }